<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="font/iconfont.css">
</head>
<body>
<div id="app">
    <div class="live_box" id="publisher">
        <!--<video id="my-video" class="video-js vjs-big-play-centered vjs-fluid"  x-webkit-airplay="allow" webkit-playsinline controls preload="auto" data-setup="{}">-->
        <!--<source  src="http://pullhls3f1b8d8b.live.126.net/live/a0a4d8f3c2894effb0989365b469b6ea/playlist.m3u8" type="application/x-mpegURL">-->
        <!--</video>-->
    </div>
    <div class="clear" style="height: 1.5rem"></div>
    <img class="down" style="width: 10rem;position: fixed;bottom: 0;z-index: 2;" src="img/dowm.png" alt="">
</div>
</body>
<script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="js/rem.js"></script>
<script>
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg); //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
    var url = getUrlParam('url');
    var app = new Vue({
        el: '#app',
        data: {
            teacher:{},
            data:{},
            course:{}
        },
        created: function () {
            this.getData();
        },
        methods: {
            getData:function () {
                var that = this;
                $.ajax({
                    url: "/api/curriculum/share_system_detail",    //请求的url地址
                    headers: {
                        appid: '1',
                        appsecret: '39b3567d0b8ac89c025b78beec26acb0',
                    },
                    dataType: "json",   //返回格式为json
                    async: true,
                    data: {curriculum_id:id},    //参数值 由APP传递
                    type: "post",
                    success: function (req) {
                        that.data = req.data;
                        document.title = req.data.curriculum_name;
                        $(".courseFeature .main").html(req.data.curriculum_description)
                        var imgArr = $("img");
                        $.each(imgArr, function(){
                            $(this).attr('class','imgWitch')
                            $('.imgWitch').css('max-width','100%')
                        });
                        that.teacher = req.data.teacher;
                        that.course = req.data.video;
                        console.log('返回数据', req.data)
                    },
                    complete: function () {
                        //请求完成的处理
                    },
                    error: function () {
                        //请求出错处理
                    }
                });
            },
            zhankai:function (data) {
                if(data == 1){
                    $('#mastr').removeClass('mastr_small');
                    $('#mastr').addClass('mastr_big');
                    $('.iconjiao_1').css('display','none')
                    $('.iconjiao_2').css('display','block')
                }
                if(data == 2){
                    $('#mastr').removeClass('mastr_big');
                    $('#mastr').addClass('mastr_small');
                    $('.iconjiao_1').css('display','block')
                    $('.iconjiao_2').css('display','none')

                }
            }
        }

    })
</script>
</html>